#ifndef __CBBALL_H__
#define __CBBALL_H__

USING_NS_CC;
/*
    0
  1   4
2   B   5
  3   6
*/
class CCBall;
class CBBall : public CBBody
{
public:
  CBBall(CBWorld* world,float x,float y);
  ~CBBall(void);
public:
  virtual void Move(float deltatime,CCPoint& Force);
  virtual float GetMass();
  virtual bool CalcBodyForce(CCPoint& force);
  void GetAllConnectedBall(std::list<CBBall*>& Lst);
  virtual bool CheckCollision(CBBody* body);
  virtual void Collision(CBBody* body);
  void Connect(CBBody* body);
  int SameColor(int color,std::list<CCSprite*>& removelst);
public:
  CCPoint mCircle;
  float mRadius;
  CCPoint mSpeed;
  bool mForce;
  CBBody* mConnect[7];
  int mColor;
};

#endif

